openarenafandomcom-20200216-history
Disabling and replacing items
Most control about items placement in each arena is stuff for map creator, however server admins (and players playing locally) can decide to disable (preventing from spawning) or to replace (making another item spawn in its place) specific items in the game. These settings affects all items of the specified kind. This should be made with some caution, but can be very interesting. Example: the railgun is thought to be overpowered in some maps with large areas, thus a server admin may want to remove it, or to replace it with a different weapon. Another example may be disabling the grappling hook, to be more fair while playing against bots, that do not use it. Disabling items is supported since the original Quake III Arena game (thus, it should work with most mods, too), while replacing items feature has been added by OpenArena 0.8.8 (thus, it does not work with any mod based upon previous gamecode). Note: this page is about preventing items from spawning in the map in "standard" gamemodes. If you wish to change the weapons available for Elimination/CTF Elimination/Last Man Standing modes (or in other modes when g_elimination feature is active), you have to use specific Elimination variables instead: see Elimination#CVARs. First, let's examine how to remove items. Disabling items Preventing items from spawning in the map is a sort of "hidden feature" since Quake III Arena, hence it should be supported by most mods. To remove a specific item from the game, you have to create an "user-defined variable" (using /set or /seta command; see set variables), composed by "disable_" + the name of the item to remove, setting it to "1". That would affect ALL items of that kind. Example: /set disable_weapon_rocketlauncher "1" would prevent ALL rocket launchers from spawning in the arena. Very important: due to these variables counting as "user-defined" variables, they do not autocomplete and they do not appear as existing, before you create them. Hence, you have to write them carefully, to avoid typos. After you set one of such variables, you have to perform a /map_restart to make the change effective. If you disable a weapon, it's recommendable to also disable its corresponding ammo box. When you want an item appearing again, you can either set the value of the variable to "0" or to "" (if you created it a few minutes ago, now you should be able to change its value also without specifying "set" command), or you can delete the user-defined variable (/unset ). Then perform a /map_restart. Don't forget to read Important tips at the bottom of this page! Disable_ variables list "Disable_" variables list (for safety, here we set them to 0... to be effective, you have to set them to 1): // Base weapons and ammo (see below for Missionpack weapons and ammo) set disable_weapon_gauntlet "0" // Usually you don't find this around the map, hence disabling it is usually pointless set disable_weapon_shotgun "0" set disable_weapon_machinegun "0" // Usually you don't find this around the map, hence disabling it is usually pointless set disable_weapon_grenadelauncher "0" set disable_weapon_rocketlauncher "0" set disable_weapon_lightning "0" set disable_weapon_railgun "0" set disable_weapon_plasmagun "0" set disable_weapon_bfg "0" set disable_weapon_grapplinghook "0" // Offhand grapple set disable_ammo_shells "0" // Ammo for shotgun set disable_ammo_bullets "0" // Ammo for machinegun set disable_ammo_grenades "0" // Ammo for grenade auncher set disable_ammo_cells "0" // Ammo for plasma gun set disable_ammo_lightning "0" // Ammo for lightning gun set disable_ammo_rockets "0" // Ammo for rocket launcher set disable_ammo_slugs "0" // Ammo for railgun set disable_ammo_bfg "0" // Ammo for BFG10K // Armor and health set disable_item_armor_shard "0" // +5 armor set disable_item_armor_combat "0" // +50 armor set disable_item_armor_body "0" // +100 armor set disable_item_health_small "0" // +5 health set disable_item_health "0" // +25 health set disable_item_health_large "0" // +50 health set disable_item_health_mega "0" // +100 health // Base holdables, powerups, etc. set disable_holdable_teleporter "0" // Personal teleporter set disable_holdable_medkit "0" // Portable medkit set disable_item_quad "0" // Quad damage powerup set disable_item_enviro "0" // Battle suit powerup set disable_item_haste "0" // Speed powerup set disable_item_invis "0" // Invisibility powerup set disable_item_regen "0" // Regeneration powerup set disable_item_flight "0" // Flight powerup set disable_team_CTF_redflag "0" // Red flag (disable with care!) set disable_team_CTF_blueflag "0" // Blue flag (disable with care!) // Missionpack weapons and ammo set disable_weapon_nailgun "0" set disable_weapon_prox_launcher "0" set disable_weapon_chaingun "0" set disable_ammo_nails "0" // Ammo for nailgun set disable_ammo_mines "0" // Ammo from proximity mines launcher set disable_ammo_belt "0" // Ammo for chaingun // Missionpack runes (Since OA 0.8.5, G_RUNES <0 or 1> variable allows to enable or disable all of them at once) set disable_item_scout "0" set disable_item_guard "0" set disable_item_doubler "0" set disable_item_ammoregen "0" // Missionpack other stuff set disable_holdable_kamikaze "0" set disable_holdable_portal "0" // Unfinished Team Arena "portal" device (not officially supported item) set disable_holdable_invulnerability "0" set disable_team_CTF_neutralflag "0" // White flag (disable with care!) set disable_item_redcube "0" // Harvester mode red skull (you should not need to disable this!) set disable_item_bluecube "0" // Harvester mode blue skull (you should not need to disable this!) Replacing items Now that you know how to disable items and weapons, we can see how to replace them. The ability for server admins to replace items has been added by OpenArena 0.8.8, hence it does NOT work with any mod based upon older gamecode (e.g. mods designed for Q3A). Replacing items works in a similar way to disabling them: again, you have to create user-defined variables, using set or seta command. This time, the first part is "replace_" (you have to follow it with the name of the original item), and the "value" has to be the name of the new item. Examples: * /set replace_weapon_railgun weapon_lightning ::Would change all railguns in the map with lightning guns (may be nice in oa_ctf4ish map, maybe?). * /set replace_weapon_nailgun holdable_medkit ::Would replace all nailguns with portable medkits. Again, a /map_restart is required to apply changes, and again removing/replacing ammo boxes for a weapon that is not in the game anymore is advisable. However, you may use these variables to swap (invert) locations of two kinds of weapons (e.g. making rocket launchers spawn in the place of railguns and vice versa), leaving their ammo in their usual places. To restore standard behavior, you can either set the variable to "" (e.g. /set replace_weapon_railgun "") or delete it (e.g. /unset replace_weapon_railgun), then perform a /map_restart. This time, setting the variable to "0" would NOT restore original behavior, but would just prevent the original item from spawning: setting any "value" (new item) that does not exactly corresponds to an item supported by the game would just disable the original item (be careful while typing). You can use the list of "disable_" variables above to find out names of items to use, hence the "replace_" variables you need to type, and which "values" to give them. In case the original item has been placed very close to walls, some "replacing combinations" may bring to the new item partially showing inside the wall, due to it requiring more space around it than the original item, to be correctly shown. However this should not be a real problem, and probably does not happen often. Don't forget to read Important tips section below. Important tips * If you disable/replace a weapon, it's advisable to also disable/replace its corresponding ammo boxes (there is no reason for players to find BFG ammo in a map that does not contain a BFG weapon). ** When you restore the weapon, don't forget to restore its ammo, too. * Using these commands with gametype-related items (e.g. white flag) may make those gametypes unplayable! * You may wish to create custom configuration files where you would store such variables, to do not require you to type them each time (e.g. with /exec remove_armor.cfg, you may run a configuration file by your own, that may contain "disable_" variables that would remove all armor bonuses from spawning; another configuration file may "unset" all those variables, restoring standard behavior). * This stuff applies to items actually spawning in the map only. Usually, players enter the game already owning gauntlet and machinegun, hence they are usually not found around the map and thus their "disable_" variables would show no effect (of course, you may disable machinegun ammo if you wish, with /set disable_ammo_bullets 1). * These commands affect ALL items of a certain kind. * These count as "user-generated" variables. They would not autocomplete or seem existing before you create them (using /set or /seta command). And the "default" value shown is simply the first one '''you' gave them''! ** User-defined variables created with /set command are usually lost when exiting the game. * Names of items you need to type are not exactly those shown in your HUD when you pick them up: they are names internally used by the game instead. You can refer to the list above to figure them out. See also * Manual/Items * Manual/Weapons * Gametypes * Special game options * Command console * Set variables * Elimination#CVARs * Configuration examples * Manual Category:Manual Category:Servers Category:Configuration examples